import request from '@/utils/request'

//查找全部：传过页码和每页的数据数量，传回某页的数据
export function listFactory(query) {
  return request({
    url: '/product/factory/selectFactoryList',
    method: 'get',
    params: query
  })
}

export function getListByName(data) {
  return request({
    url: '/product/factory/selectFactoryListByName',
    method: 'post',
    data: data
  })
}
//添加新数据：传过所有数据，传回添加数据成功与否状态
export function addList(data) {
  return request({
    url: '/product/factory/addFactoryList',
    method: 'post',
    data: data
  })
}
//删除数据: 传过id，传回成功与否状态
export function delList(data) {
  return request({
    url: '/product/factory/delFactoryList',
    method: 'post',
    data:data
  })
}
//编辑某一行的数据：传过一行全部数据，根据id改，传回状态
export function editList(data) {
  return request({
    url: '/product/factory/editFactoryList',
    method: 'post',
    data:data
  })
}
